<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>登录</title>
    <link rel="stylesheet" type="text/css" href="layui/css/layui.css" th:href="@{/static/layui/css/layui.css}"/>
</head>
<body>
<div class="layui-container">
    <div class="layui-row">
        <div class="layui-col-md6 layui-col-md-offset1">
            <fieldset class="layui-elem-field layui-field-title"><legend>登录</legend></fieldset>
            <form class="layui-form" action="/user/login" method="post">
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <input class="layui-input" type="text" name="username" id="username" placeholder="请输入用户名" />
                    </div>
                    <div class="layui-input-block">
                        <input class="layui-input" type="password" name="password" id="password" placeholder="请输入密码" />
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" type="submit" lay-submit lay-filter="LAY-auth-tree-submit">登录</button>
                        <button class="layui-btn layui-btn-primary" type="reset">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="layui/layui.js" th:src="@{/static/layui/layui.js}"></script>
<script type="text/javascript">
    layui.use(['jquery', 'form', 'layer'], function(){
        var $ = layui.jquery;
        var form = layui.form;
        var layer = layui.layer;

        form.on('submit(LAY-auth-tree-submit)', function(obj){
//            var username = $('#username').val();
//            var password = $('#password').val();

            return true;
        });
    });
</script>
</html>